package com.daiki.onlinerecruitment.config;

import com.daiki.onlinerecruitment.component.MyLocaleResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author daiki
 * @classname MyMvcConfig
 * @Description
 * @datetime 2021/10/16 15:06
 */
@Configuration
public class MyMvcConfig implements WebMvcConfigurer {

    /**
     * @return org.springframework.web.servlet.LocaleResolver
     * @Title 配置区域信息解析器
     * @Description 解析选择的区域信息，从而选择对应的语言配置文件
     * @Param [myLocaleResolver]
     * @Author daiki
     * @Date 2021/10/16
     */
    @Bean
    public LocaleResolver localeResolver(MyLocaleResolver myLocaleResolver) {
        return myLocaleResolver;
    }


}
